return {
  {
    "lewis6991/gitsigns.nvim",
    enabled = true,
    event = { "BufReadPre", "BufNewFile" },
    opts = {
      on_attach = function(bufnr)
        local gs = package.loaded.gitsigns

        local function map(mode, l, r, desc)
          vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc })
        end

        -- Navigation
        map("n", "]h", gs.next_hunk, "Next Hunk")
        map("n", "[h", gs.prev_hunk, "Prev Hunk")

        -- Actions
        map("n", "<leader>hs", gs.stage_hunk, "Stage hunk")
        map("n", "<leader>hr", gs.reset_hunk, "Reset hunk")
        map("v", "<leader>hs", function()
          gs.stage_hunk { vim.fn.line ".", vim.fn.line "v" }
        end, "Stage hunk")
        map("v", "<leader>hr", function()
          gs.reset_hunk { vim.fn.line ".", vim.fn.line "v" }
        end, "Reset hunk")

        map("n", "<leader>hS", gs.stage_buffer, "Stage buffer")
        map("n", "<leader>hR", gs.reset_buffer, "Reset buffer")

        map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")

        map("n", "<leader>hp", gs.preview_hunk, "Preview hunk")

        map("n", "<leader>hb", function()
          gs.blame_line { full = true }
        end, "Blame line")
        map("n", "<leader>hB", gs.toggle_current_line_blame, "Toggle line blame")

        map("n", "<leader>hd", gs.diffthis, "Diff this")
        map("n", "<leader>hD", function()
          gs.diffthis "~"
        end, "Diff this ~")

        -- Text object
        map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Gitsigns select hunk")
      end,
    },
  },
  {
    {
      "FabijanZulj/blame.nvim",
      lazy = false,
      config = function()
        require('blame').setup {
          date_format = "%d.%m.%Y",
          virtual_style = "right_align",
          focus_blame = true,
          merge_consecutive = false,
          max_summary_width = 30,
          colors = nil,
          blame_options = nil,
          commit_detail_view = "vsplit",
          mappings = {
            commit_info = "i",
            stack_push = "<TAB>",
            stack_pop = "<BS>",
            show_commit = "<CR>",
            close = { "<esc>", "q" },
          }
        }
        vim.keymap.set("n", "<leader>bb", "<Cmd>BlameToggle<CR>", { desc = "Toggle the blame with provided view" })
      end,
    },
  },
  {
    "sindrets/diffview.nvim",
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
    cmd = { "DiffviewOpen", "DiffviewToggleFiles" },
    config = function()
      require("diffview").setup {
        enhanced_diff_hl = true,
        hooks = {
          view_leave = function(_)
            vim.cmd [[DiffviewClose]]
          end,
          diff_buf_read = function()
            vim.wo.signcolumn = "no"
          end,
        },
      }
    end,
  },
  {
    -- 其实 lazygit 可以处理
    "dinhhuy258/git.nvim", -- git 浏览历史提交记录
    enabled = true,
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      require("git").setup {
        -- Open blame window
        blame = "<leader>gb",
        -- Open file/folder in git repostitory(远程仓库)
        browse = "<leader>go",
      }
    end,
  },
  {
    "kdheepak/lazygit.nvim",
    --NOTE: Trying out lazygit in Snacks nvim
    enabled = false,
    cmd = {
      "LazyGit",
      "LazyGitConfig",
      "LazyGitCurrentFile",
      "LazyGitFilter",
      "LazyGitFilterCurrentFile",
    },
    dependencies = "nvim-lua/plenary.nvim",
    keys = {
      {
        "<leader>lg",
        "<cmd>LazyGit<CR>",
        desc = "Open lazygit",
      },
    },
  },
}
